3.188 \(\int \frac{A+B \tan (c+d x)}{\tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^{3/2}} \, dx\)

Optimal. Leaf size=194 \[ -\frac{(25 A+7 i B) \sqrt{a+i a \tan (c+d x)}}{6 a^2 d \sqrt{\tan (c+d x)}}+\frac{\left (\frac{1}{4}+\frac{i}{4}\right ) (A-i B) \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{a^{3/2} d}+\frac{A+i B}{3 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}+\frac{11 A+5 i B}{6 a d \sqrt{\tan (c+d x)} \sqrt{a+i a \tan (c+d x)}} \]

[Out]

((1/4 + I/4)*(A - I*B)*ArcTanh[((1 + I)*Sqrt[a]*Sqrt[Tan[c + d*x]])/Sqrt[a + I*a*Tan[c + d*x]]])/(a^(3/2)*d) +
 (A + I*B)/(3*d*Sqrt[Tan[c + d*x]]*(a + I*a*Tan[c + d*x])^(3/2)) + (11*A + (5*I)*B)/(6*a*d*Sqrt[Tan[c + d*x]]*
Sqrt[a + I*a*Tan[c + d*x]]) - ((25*A + (7*I)*B)*Sqrt[a + I*a*Tan[c + d*x]])/(6*a^2*d*Sqrt[Tan[c + d*x]])

________________________________________________________________________________________

Rubi [A]  time = 0.577233, antiderivative size = 194, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.132, Rules used = {3596, 3598, 12, 3544, 205} \[ -\frac{(25 A+7 i B) \sqrt{a+i a \tan (c+d x)}}{6 a^2 d \sqrt{\tan (c+d x)}}+\frac{\left (\frac{1}{4}+\frac{i}{4}\right ) (A-i B) \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{a^{3/2} d}+\frac{A+i B}{3 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}+\frac{11 A+5 i B}{6 a d \sqrt{\tan (c+d x)} \sqrt{a+i a \tan (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Tan[c + d*x])/(Tan[c + d*x]^(3/2)*(a + I*a*Tan[c + d*x])^(3/2)),x]

[Out]

((1/4 + I/4)*(A - I*B)*ArcTanh[((1 + I)*Sqrt[a]*Sqrt[Tan[c + d*x]])/Sqrt[a + I*a*Tan[c + d*x]]])/(a^(3/2)*d) +
 (A + I*B)/(3*d*Sqrt[Tan[c + d*x]]*(a + I*a*Tan[c + d*x])^(3/2)) + (11*A + (5*I)*B)/(6*a*d*Sqrt[Tan[c + d*x]]*
Sqrt[a + I*a*Tan[c + d*x]]) - ((25*A + (7*I)*B)*Sqrt[a + I*a*Tan[c + d*x]])/(6*a^2*d*Sqrt[Tan[c + d*x]])

Rule 3596

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((a*A + b*B)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(2
*f*m*(b*c - a*d)), x] + Dist[1/(2*a*m*(b*c - a*d)), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Si
mp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x
] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] &&  !GtQ[n,
0]

Rule 3598

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((A*d - B*c)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(f
*(n + 1)*(c^2 + d^2)), x] - Dist[1/(a*(n + 1)*(c^2 + d^2)), Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n
 + 1)*Simp[A*(b*d*m - a*c*(n + 1)) - B*(b*c*m + a*d*(n + 1)) - a*(B*c - A*d)*(m + n + 1)*Tan[e + f*x], x], x],
 x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[n, -1]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3544

Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
(-2*a*b)/f, Subst[Int[1/(a*c - b*d - 2*a^2*x^2), x], x, Sqrt[c + d*Tan[e + f*x]]/Sqrt[a + b*Tan[e + f*x]]], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{A+B \tan (c+d x)}{\tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^{3/2}} \, dx &=\frac{A+i B}{3 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}+\frac{\int \frac{\frac{1}{2} a (7 A+i B)-2 a (i A-B) \tan (c+d x)}{\tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}} \, dx}{3 a^2}\\ &=\frac{A+i B}{3 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}+\frac{11 A+5 i B}{6 a d \sqrt{\tan (c+d x)} \sqrt{a+i a \tan (c+d x)}}+\frac{\int \frac{\sqrt{a+i a \tan (c+d x)} \left (\frac{1}{4} a^2 (25 A+7 i B)-\frac{1}{2} a^2 (11 i A-5 B) \tan (c+d x)\right )}{\tan ^{\frac{3}{2}}(c+d x)} \, dx}{3 a^4}\\ &=\frac{A+i B}{3 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}+\frac{11 A+5 i B}{6 a d \sqrt{\tan (c+d x)} \sqrt{a+i a \tan (c+d x)}}-\frac{(25 A+7 i B) \sqrt{a+i a \tan (c+d x)}}{6 a^2 d \sqrt{\tan (c+d x)}}+\frac{2 \int \frac{3 a^3 (i A+B) \sqrt{a+i a \tan (c+d x)}}{8 \sqrt{\tan (c+d x)}} \, dx}{3 a^5}\\ &=\frac{A+i B}{3 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}+\frac{11 A+5 i B}{6 a d \sqrt{\tan (c+d x)} \sqrt{a+i a \tan (c+d x)}}-\frac{(25 A+7 i B) \sqrt{a+i a \tan (c+d x)}}{6 a^2 d \sqrt{\tan (c+d x)}}+\frac{(i A+B) \int \frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{\tan (c+d x)}} \, dx}{4 a^2}\\ &=\frac{A+i B}{3 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}+\frac{11 A+5 i B}{6 a d \sqrt{\tan (c+d x)} \sqrt{a+i a \tan (c+d x)}}-\frac{(25 A+7 i B) \sqrt{a+i a \tan (c+d x)}}{6 a^2 d \sqrt{\tan (c+d x)}}+\frac{(A-i B) \operatorname{Subst}\left (\int \frac{1}{-i a-2 a^2 x^2} \, dx,x,\frac{\sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{2 d}\\ &=\frac{\left (\frac{1}{4}+\frac{i}{4}\right ) (A-i B) \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{a^{3/2} d}+\frac{A+i B}{3 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}+\frac{11 A+5 i B}{6 a d \sqrt{\tan (c+d x)} \sqrt{a+i a \tan (c+d x)}}-\frac{(25 A+7 i B) \sqrt{a+i a \tan (c+d x)}}{6 a^2 d \sqrt{\tan (c+d x)}}\\ \end{align*}

Mathematica [A]  time = 4.80223, size = 237, normalized size = 1.22 \[ \frac{i e^{-2 i (c+d x)} \sqrt{\tan (c+d x)} \csc (c+d x) \sec (c+d x) \left (\sqrt{-1+e^{2 i (c+d x)}} \left (A \left (-13 e^{2 i (c+d x)}+38 e^{4 i (c+d x)}-1\right )+i B \left (-7 e^{2 i (c+d x)}+8 e^{4 i (c+d x)}-1\right )\right )-3 (A-i B) e^{3 i (c+d x)} \left (-1+e^{2 i (c+d x)}\right ) \tanh ^{-1}\left (\frac{e^{i (c+d x)}}{\sqrt{-1+e^{2 i (c+d x)}}}\right )\right )}{12 a d \sqrt{-1+e^{2 i (c+d x)}} (\tan (c+d x)-i) \sqrt{a+i a \tan (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Tan[c + d*x])/(Tan[c + d*x]^(3/2)*(a + I*a*Tan[c + d*x])^(3/2)),x]

[Out]

((I/12)*(Sqrt[-1 + E^((2*I)*(c + d*x))]*(I*B*(-1 - 7*E^((2*I)*(c + d*x)) + 8*E^((4*I)*(c + d*x))) + A*(-1 - 13
*E^((2*I)*(c + d*x)) + 38*E^((4*I)*(c + d*x)))) - 3*(A - I*B)*E^((3*I)*(c + d*x))*(-1 + E^((2*I)*(c + d*x)))*A
rcTanh[E^(I*(c + d*x))/Sqrt[-1 + E^((2*I)*(c + d*x))]])*Csc[c + d*x]*Sec[c + d*x]*Sqrt[Tan[c + d*x]])/(a*d*E^(
(2*I)*(c + d*x))*Sqrt[-1 + E^((2*I)*(c + d*x))]*(-I + Tan[c + d*x])*Sqrt[a + I*a*Tan[c + d*x]])

________________________________________________________________________________________

Maple [B]  time = 0.069, size = 931, normalized size = 4.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*tan(d*x+c))/tan(d*x+c)^(3/2)/(a+I*a*tan(d*x+c))^(3/2),x)

[Out]

1/24/d*(a*(1+I*tan(d*x+c)))^(1/2)*(3*I*B*2^(1/2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^
(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)+I))*tan(d*x+c)^4*a+9*I*A*2^(1/2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x
+c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)+I))*tan(d*x+c)^3*a-3*A*2^(1/2)*ln(-(-2*2^(1/2)*(-I
*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)+I))*tan(d*x+c)^4*a-9*I*B*2^(1/
2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)+I))*tan(
d*x+c)^2*a+28*I*B*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)*(-I*a)^(1/2)*tan(d*x+c)^3+9*B*2^(1/2)*ln(-(-2*2^(1/2)*
(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)+I))*tan(d*x+c)^3*a-3*I*A*2^
(1/2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)+I))*t
an(d*x+c)*a-256*I*A*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)*(-I*a)^(1/2)*tan(d*x+c)^2+9*A*2^(1/2)*ln(-(-2*2^(1/2
)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)+I))*tan(d*x+c)^2*a+100*A*
(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)*tan(d*x+c)^3-36*I*B*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x
+c)))^(1/2)*tan(d*x+c)-3*B*2^(1/2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*
tan(d*x+c))/(tan(d*x+c)+I))*tan(d*x+c)*a+64*B*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)*tan(d*x+c)^2+
48*I*A*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)*(-I*a)^(1/2)-204*A*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(
1/2)*tan(d*x+c))/a^2/tan(d*x+c)^(1/2)/(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)/(-tan(d*x+c)+I)^3/(-I*a)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(d*x+c))/tan(d*x+c)^(3/2)/(a+I*a*tan(d*x+c))^(3/2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [B]  time = 2.05854, size = 1462, normalized size = 7.54 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(d*x+c))/tan(d*x+c)^(3/2)/(a+I*a*tan(d*x+c))^(3/2),x, algorithm="fricas")

[Out]

1/12*(sqrt(2)*((-38*I*A + 8*B)*e^(6*I*d*x + 6*I*c) + (-25*I*A + B)*e^(4*I*d*x + 4*I*c) + (14*I*A - 8*B)*e^(2*I
*d*x + 2*I*c) + I*A - B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I
*c) + 1))*e^(I*d*x + I*c) + 3*sqrt(1/2)*(a^2*d*e^(6*I*d*x + 6*I*c) - a^2*d*e^(4*I*d*x + 4*I*c))*sqrt((I*A^2 +
2*A*B - I*B^2)/(a^3*d^2))*log((2*sqrt(1/2)*a^2*d*sqrt((I*A^2 + 2*A*B - I*B^2)/(a^3*d^2))*e^(2*I*d*x + 2*I*c) +
 sqrt(2)*((I*A + B)*e^(2*I*d*x + 2*I*c) + I*A + B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((-I*e^(2*I*d*x + 2*I
*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))*e^(I*d*x + I*c))*e^(-I*d*x - I*c)/(4*I*A + 4*B)) - 3*sqrt(1/2)*(a^2*d*e^(6
*I*d*x + 6*I*c) - a^2*d*e^(4*I*d*x + 4*I*c))*sqrt((I*A^2 + 2*A*B - I*B^2)/(a^3*d^2))*log(-(2*sqrt(1/2)*a^2*d*s
qrt((I*A^2 + 2*A*B - I*B^2)/(a^3*d^2))*e^(2*I*d*x + 2*I*c) - sqrt(2)*((I*A + B)*e^(2*I*d*x + 2*I*c) + I*A + B)
*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))*e^(I*d*x + I*c
))*e^(-I*d*x - I*c)/(4*I*A + 4*B)))/(a^2*d*e^(6*I*d*x + 6*I*c) - a^2*d*e^(4*I*d*x + 4*I*c))

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(d*x+c))/tan(d*x+c)**(3/2)/(a+I*a*tan(d*x+c))**(3/2),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [A]  time = 1.46314, size = 236, normalized size = 1.22 \begin{align*} \frac{-\left (i + 1\right ) \, \sqrt{-2 \,{\left (i \, a \tan \left (d x + c\right ) + a\right )} a + 2 \, a^{2}}{\left (i \, a \tan \left (d x + c\right ) + a\right )} a^{3} +{\left (\left (2 i - 2\right ) \,{\left (i \, a \tan \left (d x + c\right ) + a\right )} a^{2} - \left (2 i - 2\right ) \, a^{3}\right )} \sqrt{-2 \,{\left (i \, a \tan \left (d x + c\right ) + a\right )} a + 2 \, a^{2}} \sqrt{i \, a \tan \left (d x + c\right ) + a} B}{{\left (-2 i \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{5} a + 8 i \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{4} a^{2} - 10 i \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3} a^{3} + 4 i \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2} a^{4}\right )} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(d*x+c))/tan(d*x+c)^(3/2)/(a+I*a*tan(d*x+c))^(3/2),x, algorithm="giac")

[Out]

(-(I + 1)*sqrt(-2*(I*a*tan(d*x + c) + a)*a + 2*a^2)*(I*a*tan(d*x + c) + a)*a^3 + ((2*I - 2)*(I*a*tan(d*x + c)
+ a)*a^2 - (2*I - 2)*a^3)*sqrt(-2*(I*a*tan(d*x + c) + a)*a + 2*a^2)*sqrt(I*a*tan(d*x + c) + a)*B)/((-2*I*(I*a*
tan(d*x + c) + a)^5*a + 8*I*(I*a*tan(d*x + c) + a)^4*a^2 - 10*I*(I*a*tan(d*x + c) + a)^3*a^3 + 4*I*(I*a*tan(d*
x + c) + a)^2*a^4)*d)